{{$logined:=.logined}}
<div class="body-wrapper">
	<script type="text/javascript">(function(){$(document).ready($.get('weather',function(data){$('.body-wrapper>.container>.row>.col-md-3:first-child').html(data)}))})()</script>
	<div class="carousel-wrapper">
		<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
				<li data-target="#carousel-example-generic" data-slide-to="1"></li>
				<li data-target="#carousel-example-generic" data-slide-to="2"></li>
			</ol>

			<!-- Wrapper for slides -->
			<div class="carousel-inner">
				<div class="item active">
					<div class="carousel-caption">家乡一隅</div>
					<img src="/static/img/eastlakewide.jpg" alt="carousel"></div>
				<div class="item">
					<img src="/static/img/seashore.jpg" alt="carousel">
					<div class="carousel-caption">渔家小夜</div>
				</div>
				<div class="item">
					<img src="/static/img/cat.jpg" alt="carousel">
					<div class="carousel-caption">某只懒猫</div>
				</div>
			</div>

			<!-- Controls -->
			<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left"></span>
			</a>
			<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right"></span>
			</a>
		</div>
	</div>
	<div class="container" style="margin-top:20px">

		<div class="row" style="margin-top:10px;">

			<div class="col-md-3">
				{{with .weather}}
				<div class="panel panel-primary">
					<div class="panel-heading" style="text-align:center">{{.City}}天气</div>

					<div class="list-group-item">
						今天是{{.DateY}} {{.Week}} {{.Temperature1}} {{.Weather1}} {{.Wind1}}
					</div>
					<div class="list-group-item">今天体感{{.C24}}，{{.Wear24}}</div>
					<div class="list-group-item">紫外线等级：{{.UV24}}</div>
					<div class="list-group-item">晒被子指数：{{.SClothes}}</div>
					<div class="list-group-item">晨练指数：{{.MrngExse}}</div>

				</div>
				{{end}}
			</div>

			<div class="col-md-6">
				<div class="panel panel-primary">
					<div class="panel-heading">
						文章列表
						<!--add article icon-->
						{{if $logined}}
						<a style="float:right;color:#FFF;" data-toggle="modal" data-target="#add_article">
							<span class="glyphicon glyphicon-plus"></span>
						</a>
						{{end}}
						<!--end-->
					</div>
					{{range .Articles}}
					<a class="list-group-item" href="/article/{{.Id}}">
						<h4 class="list-group-item-heading">
							{{.Name}}{{if $logined}}
							<span style="float:right;" data-toggle="modal" data-target="#delete_article" class="glyphicon glyphicon-remove" onclick="(function(){$('#delete_article form').attr('action','/article/{{.Id}}/del');$('#delete_article .modal-header h4').html('你确定要删除{{.Name}}吗？')})()"></span>
							{{end}}
						</h4>
						<p class="list-group-item-text">
							{{if .Tags}}
							<h7>标签:</h7>
							{{range .Tags}}
							<span class="badge">{{.}}</span>
							{{end}}
							{{end}}

							{{if .Categories}}
							<h7>
								分类:
								{{range .Categories}}
								<span class="label label-default">{{.}}</span>
								{{end}}
							</h7>
							{{end}}
						</p>
					</a>
					{{end}}
				</div>
			</div>
			<div class="col-md-3">
				<div class="panel panel-primary">
					<!-- Default panel contents -->
					<div class="panel-heading">
						一些槽{{if $logined}}
						<a style="float:right;color:#FFF;" data-toggle="modal" data-target="#add_tsukkomi">
							<span class="glyphicon glyphicon-plus"></span>
						</a>
						{{end}}
					</div>
					<div class="panel-body">
						<div class="media">
							<a class="pull-left">
								<img class="media-object" src="/static/img/gopher.jpg" alt="lovely" style="width:40px;height:40px"></a>
							<div class="media-body">
								<h4 class="media-heading">I'm 42</h4>
								A student from UESTC
							</div>
						</div>
					</div>

					<!-- List group -->
					<ul class="list-group">
						{{range .Tsukkomis}}
						<li class="list-group-item">
							{{if $logined}}
							<span style="" data-toggle="modal" data-target="#delete_tsukkomi" class="glyphicon glyphicon-remove" onclick="$('#delete_tsukkomi form').attr('action','/tsukkomi/{{.Id}}/del')"></span>
							{{end}}{{.Content}} -- {{date .Time "Y-m-d H:i:s"}}
						</li>
						{{end}}
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>